import fetch from './util/fetch';

//获取客户列表 可传参数 可以不传
export function consumerLists(data) {
    return fetch({
        url: '/merchantCustomers/list',
        params: data,
        method: 'get'
    })
}

//获取某个指定客户的交易记录
export function getOrderRecord(data) {
    return fetch({
        url: '/merchantCustomers/orderRecord',
        params: data,
        method: 'get'
    })
}

//店铺收藏列表
export function getCollectLists(data) {
    return fetch({
        url: '/merchantCollects/list',
        params: data,
        method: 'get'
    })
}

//商品收藏列表
export function getProductsCollected(data) {
    return fetch({
        url: '/goodsCollects/list',
        params: data,
        method: 'get'
    })
}

//某件商品的收藏人员
export function getGoodsCollectsBygoodsId(data) {
    return fetch({
        url: '/goodsCollects/'+data.goodsId+'/user/list',
        params: data,
        method: 'get'
    })
}

//查看某个人的评论回复
export function getCommentsById(data) {
    return fetch({
        url: '/comments/commentDetail/'+data.id,
        method: 'get',
    })
}
//评论列表
export function comment(data) {
    return fetch({
        url: '/comments/list',
        method: 'get',
        params:data
    })
}
//回复评论
export function subComment(data) {
    return fetch({
        url: '/comments/commentReply',
        method: 'patch',
        data:data
    })
}


//店铺收藏数量
export function merchantCollect() {
    return fetch({
        url: '/merchantCollects/collectNum',
        method: 'get'
    })
}